use serde::Deserialize;

#[derive(Debug, Deserialize)]
pub struct LatestRelease {
    tag_name: String,
    assets: Vec<Asset>,
    
}

impl LatestRelease {
    pub fn get_tag_name(&self) -> String {
        self.tag_name.clone()
    }
    
    pub fn get_assets(&self) -> &Vec<Asset> {
        &self.assets
    }
}

#[derive(Debug, Deserialize)]
pub struct Asset {
    name: String,
    browser_download_url: String,
}


impl Asset {
    pub fn get_name(&self) -> String {
        self.name.clone()
    }
    
    pub fn get_browser_download_url(&self) -> String {
        self.browser_download_url.clone()
    }
}